package com.design.pattern.structural.proxy;

/**
 * @Author hanyuanlai
 * @Date 2022/7/17
 */
public class LogProxy implements Movalbe{
    private Movalbe movalbe;

    public LogProxy(Movalbe movalbe) {
        this.movalbe = movalbe;
    }

    @Override
    public void move() {
        before();
        movalbe.move();
        after();
    }

    private void after() {
        System.out.println("记录结束时间");
    }

    private void before() {
        System.out.println("记录开始时间");
    }
}
